/*    */ package com.cr.quartz.config;
/*    */ 
/*    */ import java.util.Properties;
/*    */ import javax.sql.DataSource;
/*    */ import org.springframework.context.annotation.Bean;
/*    */ import org.springframework.context.annotation.Configuration;
/*    */ import org.springframework.scheduling.quartz.SchedulerFactoryBean;
/*    */ 
/*    */ @Configuration
/*    */ public class ScheduleConfig {
/*    */   @Bean
/*    */   public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource) {
/* 20 */     SchedulerFactoryBean factory = new SchedulerFactoryBean();
/* 21 */     factory.setDataSource(dataSource);
/* 24 */     Properties prop = new Properties();
/* 25 */     prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler");
/* 26 */     prop.put("org.quartz.scheduler.instanceId", "AUTO");
/* 28 */     prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool");
/* 29 */     prop.put("org.quartz.threadPool.threadCount", "20");
/* 30 */     prop.put("org.quartz.threadPool.threadPriority", "5");
/* 32 */     prop.put("org.quartz.jobStore.class", "org.quartz.impl.jdbcjobstore.JobStoreTX");
/* 34 */     prop.put("org.quartz.jobStore.isClustered", "true");
/* 35 */     prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000");
/* 36 */     prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1");
/* 37 */     prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true");
/* 41 */     prop.put("org.quartz.jobStore.misfireThreshold", "12000");
/* 42 */     prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
/* 43 */     factory.setQuartzProperties(prop);
/* 45 */     factory.setSchedulerName("RuoyiScheduler");
/* 47 */     factory.setStartupDelay(1);
/* 48 */     factory.setApplicationContextSchedulerContextKey("applicationContextKey");
/* 51 */     factory.setOverwriteExistingJobs(true);
/* 53 */     factory.setAutoStartup(true);
/* 55 */     return factory;
/*    */   }
/*    */ }


/* Location:              D:\tmp\creditorRights-admin\BOOT-INF\lib\creditorRights-quartz-4.7.0.jar!\com\cr\quartz\config\ScheduleConfig.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */